package org.jeecg.modules.wms.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * @Description: 采购到货质检结果表
 * @Author: jeecg-boot
 * @Date: 2023-08-10
 * @Version: V1.0
 */
@Data
@TableName("wms_purchase_arrival_inspection")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="wms_purchase_arrival_inspection对象", description="采购到货质检结果表")
public class WmsPurchaseArrivalInspection implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "ID")
    private String id;

    /**
     * 采购单ID
     */
    @ApiModelProperty(value = "采购单ID")
    @Excel(name = "采购单ID", width = 15)
    private String purchaseOrderId;

    /**
     * 采购单号
     */
    @ApiModelProperty(value = "采购单号")
    @Excel(name = "采购单号", width = 15)
    private String purchaseOrderNo;

    /**
     * 物料ID
     */
    @ApiModelProperty(value = "物料ID")
    @Excel(name = "物料ID", width = 15)
    private String materialId;

    /**
     * 物料编码
     */
    @ApiModelProperty(value = "物料编码")
    @Excel(name = "物料编码", width = 15)
    private String materialCode;

    /**
     * 物料名称
     */
    @ApiModelProperty(value = "物料名称")
    @Excel(name = "物料名称", width = 15)
    private String materialName;

    /**
     * 物料类型
     */
    @ApiModelProperty(value = "物料类型")
    @Excel(name = "物料类型", width = 15)
    private String materialType;

    /**
     * 规格型号
     */
    @ApiModelProperty(value = "规格型号")
    @Excel(name = "规格型号", width = 15)
    private String specification;

    /**
     * 到货数量
     */
    @ApiModelProperty(value = "到货数量")
    @Excel(name = "到货数量", width = 15)
    private BigDecimal arrivalQuantity;

    /**
     * 合格数量
     */
    @ApiModelProperty(value = "合格数量")
    @Excel(name = "合格数量", width = 15)
    private BigDecimal qualifiedQuantity;

    /**
     * 不合格数量
     */
    @ApiModelProperty(value = "不合格数量")
    @Excel(name = "不合格数量", width = 15)
    private BigDecimal unqualifiedQuantity;

    /**
     * 单位
     */
    @ApiModelProperty(value = "单位")
    @Excel(name = "单位", width = 15)
    private String unit;

    /**
     * 质检结果（1-合格，0-不合格）
     */
    @ApiModelProperty(value = "质检结果（1-合格，0-不合格）")
    @Excel(name = "质检结果", width = 15, dicCode = "inspection_result")
    private Integer inspectionResult;

    /**
     * 不合格原因
     */
    @ApiModelProperty(value = "不合格原因")
    @Excel(name = "不合格原因", width = 15)
    private String unqualifiedReason;

    /**
     * 凭证图片
     */
    @ApiModelProperty(value = "凭证图片")
    @Excel(name = "凭证图片", width = 15)
    private String evidence;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @Excel(name = "备注", width = 15)
    private String remark;

    /**
     * 供应商ID
     */
    @ApiModelProperty(value = "供应商ID")
    @Excel(name = "供应商ID", width = 15)
    private String supplierId;

    /**
     * 供应商名称
     */
    @ApiModelProperty(value = "供应商名称")
    @Excel(name = "供应商名称", width = 15)
    private String supplierName;

    /**
     * 到货日期
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "到货日期")
    @Excel(name = "到货日期", width = 15, format = "yyyy-MM-dd")
    private Date arrivalDate;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createBy;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private String updateBy;

    /**
     * 更新时间
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
    
    /**
     * 处理状态（0-未处理、1-已处理）
     */
    @ApiModelProperty(value = "处理状态（0-未处理、1-已处理）")
    @Excel(name = "处理状态", width = 15, dicCode = "inspection_status")
    private Integer status;
    
    /**
     * 原始采购数量（非数据库字段，仅用于查询）
     */
    @ApiModelProperty(value = "原始采购数量")
    @TableField(exist = false)
    private BigDecimal originalQuantity;
    /**
     * 单位成本
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "单位成本")
    private BigDecimal unitCost;
} 